home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / Telephones.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  48.3 KB  |  1,282 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Telephones.h
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __TELEPHONES__
  19. #define __TELEPHONES__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __DIALOGS__
  25. #include <Dialogs.h>
  26. #endif
  27. #ifndef __ERRORS__
  28. #include <Errors.h>
  29. #endif
  30. #ifndef __EVENTS__
  31. #include <Events.h>
  32. #endif
  33. #ifndef __CTBUTILITIES__
  34. #include <CTBUtilities.h>
  35. #endif
  36. #ifndef __COMPONENTS__
  37. #include <Components.h>
  38. #endif
  39.  
  40.  
  41.  
  42. #if PRAGMA_ONCE
  43. #pragma once
  44. #endif
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. #if PRAGMA_IMPORT
  51. #pragma import on
  52. #endif
  53.  
  54. #if PRAGMA_STRUCT_ALIGN
  55.     #pragma options align=mac68k
  56. #elif PRAGMA_STRUCT_PACKPUSH
  57.     #pragma pack(push, 2)
  58. #elif PRAGMA_STRUCT_PACK
  59.     #pragma pack(2)
  60. #endif
  61.  
  62.  
  63. enum {
  64.     curTELVersion                = 3,                            /* current Telephone Manager version */
  65.                                                                 /*    the chooseXXX symbols are defined in CTBUtilities.(pah) */
  66.     telChooseDisaster            = chooseDisaster,
  67.     telChooseFailed                = chooseFailed,
  68.     telChooseAborted            = chooseAborted,
  69.     telChooseOKMinor            = chooseOKMinor,
  70.     telChooseOKMajor            = chooseOKMajor,
  71.     telChooseCancel                = chooseCancel,
  72.     telChooseOKTermChanged        = 4
  73. };
  74.  
  75. #ifndef classTEL
  76.  
  77. enum {
  78.                                                                 /* telephone tool file type */
  79.     classTEL                    = FOUR_CHAR_CODE('vbnd')
  80. };
  81.  
  82. #endif  /*  ! defined(classTEL)  */
  83.  
  84.  
  85. enum {
  86.                                                                 /* PHYSICAL TERMINAL CONSTANTS */
  87.                                                                 /* INDEPENDENT HANDSET CONSTANTS */
  88.     telIndHSOnHook                = 0,                            /* independent handset on hook */
  89.     telIndHSOffHook                = 1,                            /* independent handset off hook */
  90.     telIndHSDisconnected        = 0,                            /* handset disconnected from the line */
  91.     telIndHSConnected            = 1,                            /* handset connected to the line */
  92.                                                                 /* HOOK STATE CONSTANTS */
  93.     telHandset                    = 1,                            /* handset hookswitch */
  94.     telSpeakerphone                = 2,                            /* speakerphone 'on' switch */
  95.     telDeviceOffHook            = 1,                            /* device off hook */
  96.     telDeviceOnHook                = 0,                            /* device on hook */
  97.                                                                 /* VOLUME CONTROL CONSTANTS */
  98.     telHandsetSpeakerVol        = 1,                            /* volume of the handset speaker */
  99.     telHandsetMicVol            = 2,                            /* sensitivity of the handset mic */
  100.     telSpeakerphoneVol            = 3,                            /* speakerphone volume */
  101.     telSpeakerphoneMicVol        = 4,                            /* sensitivity of the spkrphone mic */
  102.     telRingerVol                = 5,                            /* volume of the ringer */
  103.     telBuiltinSPVol                = 6,                            /* volume of the built-in speakerphone */
  104.     telBuiltinSPMicVol            = 7,                            /* sensitivity of the built-in speakerphone mic */
  105.     telVolSame                    = 0,                            /* leaves the volume at previous level */
  106.     telVolMin                    = 1,                            /* turns volume down to minimum level, but not off */
  107.     telVolMax                    = 100,                            /* highest level allowed by the Telephone Manager */
  108.     telVolStateSame                = 0,                            /* leaves device in same state */
  109.     telVolStateOff                = 1,                            /* turns the device off , */
  110.                                                                 /* but doesn't change the volume setting. */
  111.                                                                 /* Use for mute functions. */
  112.     telVolStateOn                = 2,                            /* turns the device on.  Volume setting is */
  113.                                                                 /* the same as previously set.*/
  114.                                                                 /* DISPLAY CONSTANTS */
  115.     telNormalDisplayMode        = 1,                            /* normal display mode */
  116.     telInspectMode                = 2,                            /* inspect display mode */
  117.     telMiscMode                    = 3,                            /* miscellaneous display mode */
  118.     telRetrieveMode                = 4,                            /* message retrieval mode */
  119.     telDirectoryQueryMode        = 5,                            /* electronic directory mode */
  120.     telEntireDisplay            = 0,                            /* entire Display */
  121.                                                                 /* KEY PRESS CONSTANTS */
  122.     telHangupKey                = 1,                            /* drop, or release, key pressed */
  123.     telHoldKey                    = 2,                            /* hold key pressed */
  124.     telConferenceKey            = 3,                            /* conference key pressed */
  125.     telTransferKey                = 4,                            /* transfer key pressed */
  126.     telForwardKey                = 5,                            /* call forward key pressed */
  127.     telCallbackKey                = 6,                            /* call back key pressed */
  128.     telDNDKey                    = 7,                            /* do not disturb key pressed */
  129.     telCallPickupKey            = 8,                            /* call Pickup key pressed */
  130.     telCallParkKey                = 9,                            /* call Park key pressed */
  131.     telCallDeflectKey            = 10,                            /* call Deflect key pressed */
  132.     telVoiceMailAccessKey        = 11,                            /* voice Mail Access key pressed */
  133.     telCallRejectKey            = 12,                            /* call Reject key pressed */
  134.     telOtherKey                    = 16,                            /* other key pressed */
  135.     telKeyPadPress                = 1,                            /* key pressed on 12 digit keypad*/
  136.     telFeatureKeyPress            = 2,                            /* feature Key Pressed */
  137.     telTerminalEnabled            = 0,
  138.     telTerminalDisabled            = 1,
  139.     telUnknown                    = 0,                            /* unknown error */
  140.     telTerminalHWDisconnected    = 1,                            /* terminal hardware is disconnected */
  141.     telDeviceDriverClosed        = 2,                            /* device driver is closed */
  142.                                                                 /* ALERT PATTERN */
  143.     telPattern0                    = 0,
  144.     telPattern1                    = 1,
  145.     telPattern2                    = 2,
  146.     telPattern3                    = 3,
  147.     telPattern4                    = 4,
  148.     telPattern5                    = 5,
  149.     telPattern6                    = 6,
  150.     telPattern7                    = 7,
  151.     telPatternOff                = 8,
  152.     telPatternUndefined            = 15,                            /* DN TYPES */
  153.     telAllDNs                    = 0,                            /* counts all types of DNs */
  154.     telInternalDNs                = 1,                            /* connected to PBX or other non-public switch */
  155.     telInternalDNsOnly            = 2,                            /* connected to PBX or other non-public switch */
  156.                                                                 /* and able to place internal calls only */
  157.     telExternalDNs                = 3,                            /* connected to public network */
  158.     telDNTypeUnknown            = 4,                            /* DN type unknown */
  159.                                                                 /* DN USAGE */
  160.     telDNNotUsed                = 0,                            /* DN is not used - onhook */
  161.     telDNPOTSCall                = 1,                            /* DN used for POTs call */
  162.     telDNFaxCall                = 2,                            /* DN used for fax call */
  163.     telDNDataCall                = 3,                            /* DN used for data call */
  164.     telDNAlerting                = 4,                            /* Incoming call at DN */
  165.     telDNUnknownState            = 5,                            /* DN is in unknown state */
  166.                                                                 /* CALL FORWARDING TYPES */
  167.     telForwardImmediate            = 1,                            /* immediately forward calls */
  168.     telForwardBusy                = 2,                            /* forward on Busy */
  169.     telForwardNoAnswer            = 3,                            /* forward on No answer */
  170.     telForwardBusyNA            = 4,                            /* forwarding for busy and no answer*/
  171.     telForwardTypeUnknown        = 5,                            /* type of forwarding is unknown */
  172.                                                                 /* CALL FORWARDING MESSAGES */
  173.     telForwardCleared            = 0,                            /* forwarding has been cleared */
  174.     telForwardEst                = 1,                            /* forwarding has been established*/
  175.     telForwardFailed            = 2,                            /* attempt to setup forwarding has failed*/
  176.                                                                 /* DO NOT DISTURB TYPES */
  177.     telDNDIntExt                = 0,                            /* do not disturb for all internal and external calls*/
  178.     telDNDExternal                = 1,                            /* do not disturb for external calls only */
  179.     telDNDInternal                = 2,                            /* do not disturb for internal calls only */
  180.     telDNDNonIntercom            = 3,                            /* do not disturb for all calls except intercom */
  181.                                                                 /* DO NOT DISTURB MESSAGES */
  182.     telDNDCleared                = 0,                            /* do not disturb has been cleared */
  183.     telDNDEst                    = 1,                            /* do not disturb has been established */
  184.     telDNDFailed                = 2,                            /* attempt to setup do not disturb has failed */
  185.                                                                 /* VOICE MAIL MESSAGES */
  186.     telAllVoiceMessagesRead        = 0,                            /* all messages have been read, none are  waiting */
  187.                                                                 /* to be read */
  188.     telNewVoiceMessage            = 1,                            /* a new message has arrived or messages are waiting */
  189.                                                                 /* for this DN */
  190.                                                                 /* DNSELECT MESSAGE */
  191.     telDNDeselected                = 0,                            /* DN has been deselected */
  192.     telDNSelected                = 1,                            /* DN has been selected */
  193.                                                                 /* CALL ORIGINATORS */
  194.     telInternalCall                = 0,                            /* return nth internal CA */
  195.     telExternalCall                = 1,                            /* return nth external CA */
  196.     telUnknownCallOrigin        = 2,                            /* unknown call type */
  197.     telAllCallOrigins            = 2,                            /* return nth CA internal or external */
  198.                                                                 /* CALL TYPES */
  199.     telVoiceMailAccessOut        = (-7),
  200.     telPageOut                    = (-6),
  201.     telIntercomOut                = (-5),
  202.     telCallbackOut                = (-4),
  203.     telPickup                    = (-3),
  204.     telParkRetrieve                = (-2),
  205.     telNormalOut                = (-1),
  206.     telUnknownCallType            = 0,
  207.     telNormalIn                    = 1,
  208.     telForwardedImmediate        = 2,
  209.     telForwardedBusy            = 3,
  210.     telForwardedNoAnswer        = 4,
  211.     telTransfer                    = 5,
  212.     telDeflected                = 6,
  213.     telIntercepted                = 7,
  214.     telDeflectRecall            = 8,
  215.     telParkRecall                = 9,
  216.     telTransferredRecall        = 10,
  217.     telIntercomIn                = 11,
  218.     telCallbackIn                = 12,                            /* DIAL TYPES */
  219.     telDNDialable                = 0,                            /* this DN could be dialed via TELSetupCall */
  220.     telDNNorthAmerican            = 1,                            /* rmtDN is standard North America 10 digit number */
  221.     telDNInternational            = 2,                            /* rmtDN is an international number */
  222.     telDNAlmostDialable            = 3,                            /* rmtDN is almost dialable, */
  223.                                                                 /* missing prefix such as 9 or 1 */
  224.     telDNUnknown                = 15,                            /* unknown whether DN is dialable */
  225.                                                                 /* CALL PROGRESS MESSAGES */
  226.     telCAPDialTone                = 1,                            /* dial tone */
  227.     telCAPRinging                = 2,                            /* destination CA is alerting */
  228.     telCAPDialing                = 3,                            /* dialing the other end */
  229.     telCAPReorder                = 4,                            /* reorder */
  230.     telCAPBusy                    = 5,                            /* busy */
  231.     telCAPRouted                = 6,                            /* call routed; rmtDN will hold the routing directory */
  232.                                                                 /* number routeDN and routePartyName have been updated */
  233.     telCAPRoutedOff                = 7,                            /* call routed off-network; no further progress will */
  234.                                                                 /* be available */
  235.     telCAPTimeout                = 8,                            /* call timed out */
  236.     telCAPUpdate                = 9,                            /* name and rmtDN information has been updated */
  237.     telCAPPrompt                = 10,                            /* the network is prompting for more information */
  238.     telCAPWaiting                = 11,                            /* call is proceeding, but there is no response yet */
  239.                                                                 /* from the destination */
  240.     telCAPCPC                    = 12,                            /* telephone tool detected CPC signal */
  241.     telCAPNoDialTone            = 13,                            /* dial tone not detected */
  242.     telCAPUnknown                = 15,                            /* call progress state unknown */
  243.     telCAPDialDisabled            = 16,                            /* Blacklisting: Dial Disabled */
  244.     telCAPBlacklistedNumber        = 17,                            /* Blacklisting: Blacklisted Number */
  245.     telCAPForbiddenNumber        = 18,                            /* Blacklisting: Forbidden Number */
  246.     telCAPModemGuardTime        = 19,                            /* Modem Guard Timein force, unable to dial */
  247.     telCAPLCDetected            = 20,                            /* trying to dial a number while the handset is offhook */
  248.     telCAPLostLC                = 21,                            /* trying manual dial or answer while handset not off hook */
  249.                                                                 /* or also lost line current during dialing. */
  250.                                                                 /* OUTGOING CALL MESSAGES */
  251.     telPhysical                    = 0,                            /* user lifted handset and initiated call */
  252.     telProgrammatic                = 1,                            /* programmatic initiation of outgoing call */
  253.                                                                 /* DISCONNECT MESSAGES */
  254.     telLocalDisconnect            = 0,                            /* local party, this user, responsible for disconnect */
  255.     telRemoteDisconnect            = 1,                            /* remote party responsible for disconnect */
  256.                                                                 /* DISCONNECT TYPES */
  257.     telCADNormal                = 1,                            /* normal disconnect */
  258.     telCADBusy                    = 2,                            /* remote user busy */
  259.     telCADNoResponse            = 3,                            /* remote not responding */
  260.     telCADRejected                = 4,                            /* call rejected */
  261.     telCADNumberChanged            = 5,                            /* number changed */
  262.     telCADInvalidDest            = 6,                            /* invalid destination address */
  263.     telCADFacilityRejected        = 7,                            /* requested facility rejected */
  264.     telCADUnobtainableDest        = 9,                            /* destination not obtainable */
  265.     telCADCongested                = 10,                            /* network congestion */
  266.     telCADIncompatibleDest        = 11,                            /* incompatible destination */
  267.     telCADTimeout                = 12,                            /* call timed out */
  268.     telCADUnknown                = 15,                            /* reason unknown */
  269.                                                                 /* CONFERENCE MESSAGES */
  270.     telConferencePrepFailed        = 0,                            /* conference could not be prepared */
  271.     telConferencePending        = 1,                            /* conference prepared successfully */
  272.     telConferenceEstFailed        = 2,                            /* conference could not be established */
  273.     telConferenceEst            = 3,                            /* conference established */
  274.                                                                 /* TRANSFER MESSAGES */
  275.     telTransferPrepFailed        = 0,                            /* transfer could not be prepared */
  276.     telTransferPending            = 1,                            /* transfer prepared successfully */
  277.     telTransferEst                = 2,                            /* consult or blind xfer successful */
  278.     telTransferFailed            = 3,                            /* consult or blind xfer failed */
  279.     telTransferred                = 4,                            /* message to originator of CA specifying */
  280.                                                                 /* that call was transferred to rmtDN */
  281.                                                                 /* HOLD MESSAGES */
  282.     telHoldCleared                = 0,
  283.     telHoldEst                    = 1,
  284.     telHoldFailed                = 2,                            /* RECEIVE DIGIT MESSAGES */
  285.     telDigitAudible                = 0,
  286.     telDigitNotAudible            = 1,                            /* CALL PARK MESSAGES */
  287.     telCallParkEst                = 1,                            /* call has been successfully parked */
  288.     telCallParkRetrieveEst        = 2,                            /* parked Call has been successfully retrieved */
  289.     telCallParkFailed            = 3,                            /* attempt to setup call park has failed */
  290.     telCallParkRetrieveFailed    = 4,                            /* attempt to retrieve parked call failed */
  291.     telCallParkRecall            = 5,                            /* call park has been recalled */
  292.                                                                 /* CALL BACK MESSAGES */
  293.     telCallbackCleared            = 0,                            /* call back has been cleared */
  294.     telCallbackEst                = 1,                            /* call back has been established */
  295.     telCallbackNowAvail            = 2,                            /* call can be called back with TELCallBackNow */
  296.                                                                 /* if CA is zero, else call IS calling back on CA */
  297.     telCallbackFailed            = 3,                            /* attempt to setup callback has failed */
  298.     telCallbackDesired            = 4,                            /* a user has called this terminal, received no */
  299.                                                                 /* answer and desires this terminal to call it */
  300.                                                                 /* back */
  301.     telCallbackDesiredCleared    = 5,                            /* call back for no answer no longer desired */
  302.     telCalledback                = 6,                            /* callback has occurred successfully */
  303.                                                                 /* CALL REJECT MESSAGES */
  304.     telCallRejectFailed            = 0,                            /* attempt to reject call has failed */
  305.     telCallRejectEst            = 1,                            /* call successfully rejected */
  306.     telCallRejected                = 2,                            /* message to originator that call was rejected */
  307.                                                                 /* CALL DEFLECT MESSAGES */
  308.     telCallDeflectFailed        = 0,                            /* attempt to deflect call has failed */
  309.     telCallDeflectEst            = 1,                            /* call successfully deflected */
  310.     telCallDeflectRecall        = 2,                            /* deflected call has been recalled */
  311.     telCallDeflected            = 3,                            /* message to originator that call was deflected */
  312.                                                                 /* to rmtDN */
  313.     telAutoDeflectImmediate        = 4,                            /* a call was automatically deflected from this */
  314.                                                                 /* terminal as a result of immediate call */
  315.                                                                 /* forwarding */
  316.     telAutoDeflectBusy            = 5,                            /* a call was automatically deflected from this */
  317.                                                                 /* terminal as a result of call forwarding on busy */
  318.     telAutoDeflectNoAnswer        = 6,                            /* a call was automatically deflected from this */
  319.                                                                 /* terminal as a result of call forwarding on */
  320.                                                                 /* no answer */
  321.                                                                 /* CONFERENCE SPLIT MESSAGES */
  322.     telConferenceSplitFailed    = 0,                            /* CA could not be split */
  323.     telConferenceSplitEst        = 1,                            /* CA split successfully */
  324.                                                                 /* CONFERENCE DROP MESSAGES */
  325.     telConferenceDropFailed        = 0,                            /* CA could not be dropped */
  326.     telConferenceDropped        = 1,                            /* CA dropped successfully */
  327.                                                                 /* CALL PICKUP MESSAGES */
  328.     telCallPickupEst            = 0,                            /* call pickup was successful */
  329.     telCallPickupFailed            = 1,                            /* call pickup failed */
  330.     telCallPickedUp                = 2,                            /* message to originator that call was picked */
  331.                                                                 /* up at a different DN */
  332.                                                                 /* PAGING MESSAGES */
  333.     telPageEst                    = 0,                            /* paging was successful */
  334.     telPageComplete                = 1,                            /* paging activity completed */
  335.     telPageFailed                = 2,                            /* paging failed */
  336.                                                                 /* INTERCOM MESSAGES */
  337.     telIntercomEst                = 0,                            /* intercom was successful */
  338.     telIntercomComplete            = 1,                            /* intercom activity completed */
  339.     telIntercomFailed            = 2,                            /* intercom failed */
  340.                                                                 /* MODEM TONE MESSAGES */
  341.     telModemToneDetected        = 0,                            /* modem tone was detected */
  342.     telModemToneCleared            = 1,                            /* modem tone went away */
  343.                                                                 /* FAX TONE MESSAGES */
  344.     telFaxToneDetected            = 0,                            /* fax tone was detected */
  345.     telFaxToneCleared            = 1,                            /* fax tone went away */
  346.                                                                 /* IN USE MESSAGES */
  347.     telInUsePrivate                = 0,                            /* MADN is in use and can't be accessed */
  348.     telInUseCanAccess            = 1,                            /* MADN is in use, and others can access it */
  349.                                                                 /* and join in */
  350.     telInUseCanMakePrivate        = 2,                            /* MADN is in use, but available for any one */
  351.                                                                 /* person to access */
  352.     telInUseCleared                = 3,                            /* MADN is no longer in use */
  353.                                                                 /* CALL APPEARANCE STATES */
  354.     telCAIdleState                = 0,                            /* a call doesn't exist at this time */
  355.     telCAInUseState                = 1,                            /* the call is active but at another terminal */
  356.     telCAOfferState                = 2,                            /* a call is being offered to the terminal */
  357.     telCAQueuedState            = 3,                            /* a call is being queued at this terminal */
  358.     telCAAlertingState            = 4,                            /* a call is alerting at the terminal */
  359.     telCADialToneState            = 5,                            /* initiated outgoing call has dialtone */
  360.     telCADialingState            = 6,                            /* initiated outgoing call is dialing */
  361.     telCAWaitingState            = 7,                            /* initiated outgoing call is waiting for */
  362.                                                                 /* response from destination */
  363.     telCARingingState            = 8,                            /* the outgoing call is ringing. */
  364.     telCABusyState                = 9,                            /* destination is busy or can't be reached */
  365.     telCAHeldState                = 10,                            /* call has been put on hold by this terminal */
  366.     telCAConferencedState        = 11,                            /* this CA is part of a conference now */
  367.     telCAActiveState            = 12,                            /* the call is active and parties are free */
  368.                                                                 /* to exchange data */
  369.     telCAReorderState            = 13,                            /* CA is in a reorder state */
  370.     telCAConferencedHeldState    = 14,                            /* CA is a conference call in a held state */
  371.     telCAUnknownState            = 15,                            /* the call state is unknown */
  372.                                                                 /* TERMINAL MESSAGE EVENTMASKS */
  373.     telTermHookMsg                = 0x00000001,                    /* the hookswitch state has changed */
  374.     telTermKeyMsg                = 0x00000002,                    /* a phone pad key has been depressed */
  375.     telTermVolMsg                = 0x00000004,                    /* volume setting has changed */
  376.     telTermDisplayMsg            = 0x00000008,                    /* display has changed */
  377.     telTermEnableMsg            = 0x00000010,                    /* terminal has become enabled */
  378.     telTermOpenMsg                = 0x00000020,                    /* terminal has been opened */
  379.     telTermCloseMsg                = 0x00000040,                    /* terminal is shutting down */
  380.     telTermResetMsg                = 0x00000080,                    /* terminal has been reset */
  381.     telTermErrorMsg                = 0x00000100,                    /* hard equipment error */
  382.     telTermIndHSStateChgMsg        = 0x00000200,                    /* change in handset state from inacive to */
  383.                                                                 /* active or vice versa */
  384.     telTermIndHSConnectMsg        = 0x00000400,                    /* independent handset connection has been changed */
  385.     telTermKeyImmMsg            = 0x00000800,                    /* immidiate arrival of phone pad key */
  386.     telTermVolStateMsg            = 0x00001000,                    /* volume state has changed */
  387.     telTermOtherMsg                = (long)0x80000000,                /* vendor defined error */
  388.     telAllTermMsgs                = 0x00001FFF,                    /* mask to all non tool specific terminal events */
  389.                                                                 /* DN MESSAGE EVENTMASK CONSTANTS */
  390.     telDNForwardMsg                = 0x00000001,                    /* forward feature activity */
  391.     telDNDNDMsg                    = 0x00000002,                    /* do not disturb feature activity */
  392.     telDNVoiceMailMsg            = 0x00000004,                    /* message has arrived for this DN */
  393.     telDNSelectedMsg            = 0x00000008,                    /* DN has been selected or deselected */
  394.     telDNOtherMsg                = (long)0x80000000,                /* a custom message for use by tools */
  395.     telAllDNMsgs                = 0x0000000F,                    /* mask to all non tool specific dn events */
  396.                                                                 /* CA MESSAGE EVENTMASK CONSTANTS */
  397.     telCAAlertingMsg            = 0x00000001,                    /* CA is alerting  */
  398.     telCAOfferMsg                = 0x00000002,                    /* CA is being offered a call */
  399.     telCAProgressMsg            = 0x00000004,                    /* call progress info for this CA */
  400.     telCAOutgoingMsg            = 0x00000008,                    /* CA is initiating an outgoing call */
  401.     telCADisconnectMsg            = 0x00000010,                    /* CA disconnected (dropped or rmt disc */
  402.     telCAActiveMsg                = 0x00000020,                    /* CA is active and voice/data is free */
  403.                                                                 /* to flow end to end */
  404.     telCAConferenceMsg            = 0x00000040,                    /* conference activity on CA */
  405.     telCATransferMsg            = 0x00000080,                    /* transfer feature activity */
  406.     telCAHoldMsg                = 0x00000100,                    /* hold feature activity */
  407.     telCADigitsMsg                = 0x00000200,                    /* remote signaling digits arrived */
  408.     telCACallParkMsg            = 0x00000400,                    /* CA call park feature activity */
  409.     telCACallbackMsg            = 0x00000800,                    /* CA call back feature activity  */
  410.     telCARejectMsg                = 0x00001000,                    /* CA is rejected */
  411.     telCADeflectMsg                = 0x00002000,                    /* CA is deflected */
  412.     telCAForwardMsg                = 0x00004000,                    /* CA is forwarded to this DN  */
  413.     telCAConferenceSplitMsg        = 0x00008000,                    /* conference split activity  */
  414.     telCAConferenceDropMsg        = 0x00010000,                    /* conference drop activity  */
  415.     telCAQueuedMsg                = 0x00020000,                    /* CA has been queued  */
  416.     telCAInUseMsg                = 0x00040000,                    /* CA is in use  */
  417.     telCACallPickupMsg            = 0x00080000,                    /* CA pickup activity */
  418.     telCAPagingMsg                = 0x00100000,                    /* CA paging activity */
  419.     telCAIntercomMsg            = 0x00200000,                    /* CA intercom activity */
  420.     telCAModemToneMsg            = 0x00400000,                    /* modem tones detected */
  421.     telCAFaxToneMsg                = 0x00800000,                    /* fax tones detected */
  422.     telCAIdleMsg                = 0x01000000,                    /* CA is in idle state */
  423.     telCASuccessiveAlertMsg        = 0x02000000,                    /* phone is alerting, one per ring */
  424.     telCAUserUserInfoMsg        = 0x04000000,                    /* user to user information has arrrived */
  425.                                                                 /* for this CA */
  426.     telCAHandOffMsg                = 0x08000000,                    /* CA is ready for hand-off */
  427.     telCAVoiceDetectedMsg        = 0x10000000,                    /* voice Detect related event */
  428.     telCASilenceDetectedMsg        = 0x20000000,                    /* silence Detect related event */
  429.     telCADigitsImmMsg            = 0x40000000,                    /* immidiate arrival of remote signaling digits */
  430.     telCAOtherMsg                = (long)0x80000000,                /* tool specific CA message */
  431.     telAllCAMsgs                = 0x7FFFFFFF                    /* mask to all non tool specific CA events */
  432. };
  433.  
  434. typedef OSErr                             TELErr;
  435. typedef unsigned long                     TELFlags;
  436.  
  437. enum {
  438.     telNoMenus                    = 1L << 16,                        /* tells tool not to display any custom menus */
  439.     telQuiet                    = 1L << 17,                        /* tells tool not to display any dialog boxes or alerts */
  440.     telConfigChanged            = 1L << 18                        /* notifies application that the config has changed */
  441. };
  442.  
  443. typedef unsigned long                     TELFeatureFlags;
  444.  
  445. enum {
  446.     pcmAvail                    = 1L << 0,                        /* true if PCM voice data accessible */
  447.     hasHandset                    = 1L << 1,                        /* true if a phone handset is attached  */
  448.     hasSpeakerphone                = 1L << 2,                        /* true if a 2 way speakerphone is attached */
  449.     canOnHookDial                = 1L << 3,                        /* can on-hook dial */
  450.     hasRinger                    = 1L << 4,                        /* terminal has its own ringer */
  451.     canSetDisplay                = 1L << 5,                        /* application can write to the display */
  452.     hasKeypad                    = 1L << 6,                        /* attached phone has standard 12 key pad */
  453.     hasVideo                    = 1L << 7,                        /* terminal has a videophone */
  454.     hasOther                    = 1L << 8,                        /* reserved for future use */
  455.     crossDNConference            = 1L << 9,                        /* can perform cross-DN conferences */
  456.     hasSubaddress                = 1L << 10,                        /* attached network supports subaddressing */
  457.     hasUserUserInfo                = 1L << 11,                        /* network supports user-to-user info */
  458.     hasHandsetSoundStreams        = 1L << 12,                        /* sound streams are supported on the handset */
  459.     hasIndHandset                = 1L << 13,                        /* handset can be accessed independently of the phone line */
  460.     hasBuiltinSpeakerphone        = 1L << 14                        /* speaker and microphone of the Mac can be used */
  461. };
  462.  
  463.  
  464. struct TELTermRecord {
  465.  
  466.     short                             tRef;
  467.     TELFeatureFlags                 featureFlags;
  468.     short                             handsetSpeakerVol;
  469.     short                             handsetMicVol;
  470.     short                             speakerphoneVol;
  471.     short                             speakerphoneMicVol;
  472.     short                             ringerVol;
  473.     short                             otherVol;
  474.     short                             ringerTypes;
  475.     short                             hasDisplay;
  476.     short                             displayRows;
  477.     short                             numDNs;
  478.     short                             maxAllocCA;
  479.     short                             curAllocCA;
  480.     short                             builtinSpeakerVol;
  481.     short                             builtinSpeakerMicVol;
  482.     long                             reserved;
  483. };
  484. typedef struct TELTermRecord TELTermRecord;
  485.  
  486. typedef TELTermRecord *                    TELTermPtr;
  487. struct TELRecord {
  488.     short                             procID;
  489.  
  490.     TELFlags                         flags;
  491.     short                             reserved;
  492.  
  493.     long                             refCon;
  494.     long                             userData;
  495.  
  496.     UniversalProcPtr                 defproc;
  497.  
  498.     Ptr                             config;
  499.     Ptr                             oldConfig;
  500.  
  501.     TELTermPtr                         pTELTerm;
  502.  
  503.     long                             telPrivate;
  504.     long                             reserved1;
  505.     long                             reserved2;
  506.  
  507.     long                             pTELTermSize;
  508.     short                             version;
  509.  
  510. };
  511. typedef struct TELRecord TELRecord;
  512.  
  513. typedef TELRecord *                        TELPtr;
  514. typedef TELPtr *                        TELHandle;
  515. typedef unsigned long                     TELDNFeatureFlags;
  516.  
  517. enum {
  518.     dndSub                        = 1L << 0,                        /* do not disturb subscribed */
  519.     dndAvail                    = 1L << 1,                        /* do not disturb available */
  520.     dndActive                    = 1L << 2,                        /* do not disturb active */
  521.     voiceMailAccessSub            = 1L << 3,                        /* message waiting subscribed */
  522.     voiceMailAccessAvail        = 1L << 4,                        /* message waiting available */
  523.     voiceMailAccessActive        = 1L << 5,                        /* message waiting active */
  524.     pagingSub                    = 1L << 6,                        /* paging is subscribed */
  525.     pagingAvail                    = 1L << 7,                        /* paging is available */
  526.     pagingActive                = 1L << 8,                        /* paging is active */
  527.     intercomSub                    = 1L << 9,                        /* intercom is subscribed */
  528.     intercomAvail                = 1L << 10,                        /* intercom is available */
  529.     intercomActive                = 1L << 11,                        /* intercom is active */
  530.     dnSelectSub                    = 1L << 12,                        /* DN select is subscribed */
  531.     dnSelectAvail                = 1L << 13,                        /* DN select is available */
  532.     dnSelectActive                = 1L << 14,                        /* DN is selected */
  533.     callPickupSub                = 1L << 15,                        /* call pickup is subscribed */
  534.     callPickupAvail                = 1L << 16,                        /* call pickup is available */
  535.     dnInUse                        = 1L << 17,                        /* a CA is allocated for this DN */
  536.     logicalDN                    = 1L << 18,                        /* this DN is not on this terminal */
  537.     dnAccessible                = 1L << 19,                        /* commands can be sent to this DN */
  538.     canInitiate                    = 1L << 20,                        /* an outgoing CA can be initiated */
  539.     voiceMessageWaiting            = 1L << 21,                        /* voice mail waiting for this dn */
  540.     hasDNSoundStreams            = 1L << 22,                        /* sound streams are supported on this DN */
  541.     autoAnswerAvail                = 1L << 23,                        /* AutoAnswer is set for this DN */
  542.     autoAnswerActive            = 1L << 24,                        /* AutoAnswer is currently applied to CA on this DN */
  543.     tollSaverAvail                = 1L << 25,                        /* tollSaver is set for this DN */
  544.     tollSaverActive                = 1L << 26                        /* tollSaver is currently applied to CA on this DN */
  545. };
  546.  
  547. typedef unsigned long                     TELDNForwardFlags;
  548.  
  549. enum {
  550.     immediateForwardSub            = 1L << 0,                        /* immediate call forward subscribed */
  551.     immediateForwardAvail        = 1L << 1,                        /* immediate call forward available */
  552.     immediateForwardActive        = 1L << 2,                        /* immediate call forward active */
  553.     busyForwardSub                = 1L << 3,                        /* forward on busy subscribed */
  554.     busyForwardAvail            = 1L << 4,                        /* forward on busy available */
  555.     busyForwardActive            = 1L << 5,                        /* forward on busy active */
  556.     noAnswerForwardSub            = 1L << 6,                        /* no answer call forward subscribed */
  557.     noAnswerForwardAvail        = 1L << 7,                        /* no answer call forward available */
  558.     noAnswerForwardActive        = 1L << 8,                        /* no answer call forward active */
  559.     busyNAForwardSub            = 1L << 9,                        /* busy & no answer call forward subscribed */
  560.     busyNAForwardAvail            = 1L << 10,                        /* busy & no answer call forward available */
  561.     busyNAForwardActive            = 1L << 11                        /* busy & no answer call forward active */
  562. };
  563.  
  564.  
  565. struct TELDNRecord {
  566.  
  567.     short                             dnRef;
  568.     StringPtr                         dn;
  569.     StringPtr                         dnPartyName;
  570.     StringPtr                         dnSubaddress;
  571.     TELHandle                         hTEL;
  572.     short                             maxAllocCA;
  573.     short                             curAllocCA;
  574.     short                             dnType;
  575.     TELDNFeatureFlags                 featureFlags;
  576.     short                             numPageIDs;
  577.     short                             numIntercomIDs;
  578.     short                             numPickupIDs;
  579.     TELDNForwardFlags                 forwardFlags;
  580.     StringPtr                         iForwardDN;
  581.     StringPtr                         iForwardSubaddress;
  582.     StringPtr                         iForwardPartyName;
  583.     StringPtr                         bForwardDN;
  584.     StringPtr                         bForwardSubaddress;
  585.     StringPtr                         bForwardPartyName;
  586.     StringPtr                         naForwardDN;
  587.     StringPtr                         naForwardSubaddress;
  588.     StringPtr                         naForwardPartyName;
  589.     short                             naForwardRings;
  590.     long                             telDNPrivate;
  591.     long                             refCon;
  592.     long                             userData;
  593.     long                             reserved;
  594. };
  595. typedef struct TELDNRecord TELDNRecord;
  596.  
  597. typedef TELDNRecord *                    TELDNPtr;
  598. typedef TELDNPtr *                        TELDNHandle;
  599. typedef unsigned long                     TELCAFeatureFlags;
  600.  
  601. enum {
  602.     holdSub                        = 1L << 0,                        /* hold subscribed  */
  603.     holdAvail                    = 1L << 1,                        /* hold available  */
  604.     holdActive                    = 1L << 2,                        /* hold active  */
  605.     conferenceSub                = 1L << 3,                        /* conference subscribed */
  606.     conferenceAvail                = 1L << 4,                        /* conference available */
  607.     conferenceActive            = 1L << 5,                        /* conference active  */
  608.     conferenceDropSub            = 1L << 6,                        /* conference drop subscribed  */
  609.     conferenceDropAvail            = 1L << 7,                        /* a call to TELDrop will drop this */
  610.                                                                 /* CA only from a conference */
  611.     conferenceSplitSub            = 1L << 8,                        /* conference split subscribed  */
  612.     conferenceSplitAvail        = 1L << 9,                        /* conference split available for this CA */
  613.     numToConferenceRequired        = 1L << 10,                        /* the number of CAs to be conferenced is */
  614.                                                                 /* required in TELConfPrep  */
  615.     transferSub                    = 1L << 11,                        /* transfer subscribed  */
  616.     transferAvail                = 1L << 12,                        /* transfer available  */
  617.     transferActive                = 1L << 13,                        /* transfer active */
  618.     caRelated                    = 1L << 14                        /* this CA is the specified in some other CA's relatedCA field*/
  619. };
  620.  
  621. typedef unsigned long                     TELCAOtherFeatures;
  622.  
  623. enum {
  624.     callbackSub                    = 1L << 0,                        /* call back subscribed */
  625.     callbackAvail                = 1L << 1,                        /* call back available */
  626.     callbackActive                = 1L << 2,                        /* call back active  */
  627.     callbackClearSub            = 1L << 3,                        /* call back clearing subscribed */
  628.     callbackNowSub                = 1L << 4,                        /* call back now subscribed */
  629.     callbackNowAvail            = 1L << 5,                        /* call back now available  */
  630.     callbackBusy                = 1L << 6,                        /* call back on busy */
  631.     callbackNoAnswer            = 1L << 7,                        /* call back on no answer */
  632.     callbackReturnsRef            = 1L << 8,                        /* call back returns a reference */
  633.     parkSub                        = 1L << 9,                        /* call park subscribed */
  634.     parkAvail                    = 1L << 10,                        /* call park available */
  635.     parkActive                    = 1L << 11,                        /* call park active */
  636.     parkRetrieveSub                = 1L << 12,                        /* call park retrieve subscribed */
  637.     parkRetrieveWithID            = 1L << 13,                        /* retrieve parked calls with IDs */
  638.     parkWithReturnedID            = 1L << 14,                        /* park call to a specific remote ID */
  639.     parkWithGivenID                = 1L << 18,                        /* for switch that requires ID for parking */
  640.     rejectable                    = 1L << 15,                        /* CA is rejectable  */
  641.     deflectable                    = 1L << 16,                        /* CA is deflectable  */
  642.     acceptable                    = 1L << 17,                        /* CA is acceptable */
  643.     voiceDetected                = 1L << 19,                        /* voice has been detected on this CA incase of */
  644.                                                                 /* an incoming call */
  645.     callAnswdTSRings            = 1L << 20                        /* incoimng call was answered on TollSaver rings */
  646. };
  647.  
  648. typedef struct TELCARecord                 TELCARecord;
  649. typedef TELCARecord *                    TELCAPtr;
  650. typedef TELCAPtr *                        TELCAHandle;
  651. struct TELCARecord {
  652.     short                             caRef;
  653.     TELDNHandle                     hTELDN;
  654.     TELHandle                         hTEL;
  655.     short                             caState;
  656.     TELCAHandle                     relatedCA;
  657.     long                             connectTime;                /* can be used by application to keep track of connect time */
  658.     short                             intExt;
  659.     short                             callType;
  660.     short                             dialType;
  661.     short                             bearerType;
  662.     short                             rate;
  663.     StringPtr                         rmtDN;
  664.     StringPtr                         rmtPartyName;
  665.     StringPtr                         rmtSubaddress;
  666.     StringPtr                         routeDN;
  667.     StringPtr                         routePartyName;
  668.     StringPtr                         routeSubaddress;
  669.     short                             priority;
  670.     short                             conferenceLimit;
  671.     TELCAFeatureFlags                 featureFlags;
  672.     TELCAOtherFeatures                 otherFeatures;
  673.     long                             telCAPrivate;
  674.     long                             refCon;
  675.     long                             userData;
  676.     long                             reserved;
  677. };
  678.  
  679. /* Constants for HandleType in structure above */
  680.  
  681. enum {
  682.     telHandleType                = 0,                            /* feature requires a terminal handle */
  683.     telDNHandleType                = 1,                            /* feature requires a DN handle */
  684.     telCAHandleType                = 2                                /* feature requires a CA handle */
  685. };
  686.  
  687. struct FeatureList {
  688.     short                             featureID;
  689.     StringPtr                         featureName;
  690.     short                             handleType;
  691.     struct FeatureList *            nextFeature;
  692. };
  693. typedef struct FeatureList FeatureList;
  694.  
  695. typedef FeatureList *                    FeatureListPtr;
  696. /* CA MESSAGE STRUCTURES FOR MSGINFO */
  697. struct CAGenericMsgRec {
  698.     StringPtr                         rmtDN;
  699.     StringPtr                         rmtName;
  700.     StringPtr                         rmtSubaddress;
  701.     short                             dialType;
  702. };
  703. typedef struct CAGenericMsgRec CAGenericMsgRec;
  704.  
  705. struct CAUserUserInfoMsgRec {
  706.     StringPtr                         userUserInfo;
  707. };
  708. typedef struct CAUserUserInfoMsgRec CAUserUserInfoMsgRec;
  709.  
  710. struct CAConfMsgRec {
  711.     TELCAHandle                     relatedCA;
  712. };
  713. typedef struct CAConfMsgRec CAConfMsgRec;
  714.  
  715. struct CATransfMsgRec {
  716.     StringPtr                         rmtDN;
  717.     StringPtr                         rmtName;
  718.     StringPtr                         rmtSubaddress;
  719.     short                             dialType;
  720.     TELCAHandle                     prepCA;
  721. };
  722. typedef struct CATransfMsgRec CATransfMsgRec;
  723.  
  724. typedef CALLBACK_API( void , TelephoneTermMsgProcPtr )(TELHandle hTEL, long msg, short mtype, short value, long globals);
  725. typedef CALLBACK_API( void , TelephoneDNMsgProcPtr )(TELDNHandle hTELDN, long Msg, short mtype, short value, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress, long globals);
  726. typedef CALLBACK_API( void , TelephoneCAMsgProcPtr )(TELCAHandle hTELCA, long Msg, short mtype, short value, Ptr Msginfo, long globals);
  727. typedef CALLBACK_API( void , TelephoneChooseIdleProcPtr )(void );
  728. typedef STACK_UPP_TYPE(TelephoneTermMsgProcPtr)                 TelephoneTermMsgUPP;
  729. typedef STACK_UPP_TYPE(TelephoneDNMsgProcPtr)                     TelephoneDNMsgUPP;
  730. typedef STACK_UPP_TYPE(TelephoneCAMsgProcPtr)                     TelephoneCAMsgUPP;
  731. typedef STACK_UPP_TYPE(TelephoneChooseIdleProcPtr)                 TelephoneChooseIdleUPP;
  732. enum { uppTelephoneTermMsgProcInfo = 0x0000EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
  733. enum { uppTelephoneDNMsgProcInfo = 0x003FEBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  734. enum { uppTelephoneCAMsgProcInfo = 0x0003EBC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  735. enum { uppTelephoneChooseIdleProcInfo = 0x00000000 };             /* pascal no_return_value Func() */
  736. #define NewTelephoneTermMsgProc(userRoutine)                     (TelephoneTermMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneTermMsgProcInfo, GetCurrentArchitecture())
  737. #define NewTelephoneDNMsgProc(userRoutine)                         (TelephoneDNMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneDNMsgProcInfo, GetCurrentArchitecture())
  738. #define NewTelephoneCAMsgProc(userRoutine)                         (TelephoneCAMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneCAMsgProcInfo, GetCurrentArchitecture())
  739. #define NewTelephoneChooseIdleProc(userRoutine)                 (TelephoneChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneChooseIdleProcInfo, GetCurrentArchitecture())
  740. #define CallTelephoneTermMsgProc(userRoutine, hTEL, msg, mtype, value, globals)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppTelephoneTermMsgProcInfo, (hTEL), (msg), (mtype), (value), (globals))
  741. #define CallTelephoneDNMsgProc(userRoutine, hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals)  CALL_EIGHT_PARAMETER_UPP((userRoutine), uppTelephoneDNMsgProcInfo, (hTELDN), (Msg), (mtype), (value), (rmtDN), (rmtName), (rmtSubaddress), (globals))
  742. #define CallTelephoneCAMsgProc(userRoutine, hTELCA, Msg, mtype, value, Msginfo, globals)  CALL_SIX_PARAMETER_UPP((userRoutine), uppTelephoneCAMsgProcInfo, (hTELCA), (Msg), (mtype), (value), (Msginfo), (globals))
  743. #define CallTelephoneChooseIdleProc(userRoutine)                 CALL_ZERO_PARAMETER_UPP((userRoutine), uppTelephoneChooseIdleProcInfo)
  744. EXTERN_API( TELErr )
  745. InitTEL                            (void);
  746.  
  747. EXTERN_API( TELErr )
  748. TELGetInfo                        (TELHandle                 hTEL);
  749.  
  750. EXTERN_API( TELErr )
  751. TELOpenTerm                        (TELHandle                 hTEL);
  752.  
  753. EXTERN_API( TELErr )
  754. TELResetTerm                    (TELHandle                 hTEL);
  755.  
  756. EXTERN_API( TELErr )
  757. TELCloseTerm                    (TELHandle                 hTEL);
  758.  
  759. EXTERN_API( TELErr )
  760. TELTermMsgHand                    (TELHandle                 hTEL,
  761.                                  long                     eventMask,
  762.                                  TelephoneTermMsgUPP     msgProc,
  763.                                  long                     globals);
  764.  
  765. EXTERN_API( TELErr )
  766. TELClrTermMsgHand                (TELHandle                 hTEL,
  767.                                  TelephoneTermMsgUPP     msgProc);
  768.  
  769. EXTERN_API( TELErr )
  770. TELTermEventsSupp                (TELHandle                 hTEL,
  771.                                  long *                    eventMask);
  772.  
  773. EXTERN_API( short )
  774. TELGetProcID                    (Str255                 name);
  775.  
  776. EXTERN_API( TELHandle )
  777. TELNew                            (short                     procID,
  778.                                  TELFlags                 flags,
  779.                                  long                     refCon,
  780.                                  long                     userData);
  781.  
  782. EXTERN_API( TELHandle )
  783. TELNewWithResult                (short                     procID,
  784.                                  TELFlags                 flags,
  785.                                  long                     refCon,
  786.                                  long                     userData,
  787.                                  TELErr *                error);
  788.  
  789. EXTERN_API( TELErr )
  790. TELDefault                        (Ptr *                    theConfig,
  791.                                  short                     procID,
  792.                                  Boolean                 allocate);
  793.  
  794. EXTERN_API( Boolean )
  795. TELValidate                        (TELHandle                 hTEL);
  796.  
  797. EXTERN_API( Ptr )
  798. TELGetConfig                    (TELHandle                 hTEL);
  799.  
  800. EXTERN_API( short )
  801. TELSetConfig                    (TELHandle                 hTEL,
  802.                                  Ptr                     thePtr);
  803.  
  804. EXTERN_API( TELErr )
  805. TELChoose                        (TELHandle *            hTEL,
  806.                                  Point                     where,
  807.                                  TelephoneChooseIdleProcPtr  idleProc);
  808.  
  809. EXTERN_API( Handle )
  810. TELSetupPreflight                (short                     procID,
  811.                                  long *                    magicCookie);
  812.  
  813. EXTERN_API( void )
  814. TELSetupSetup                    (short                     procID,
  815.                                  Ptr                     theConfig,
  816.                                  short                     count,
  817.                                  DialogPtr                 theDialog,
  818.                                  long *                    magicCookie);
  819.  
  820. EXTERN_API( Boolean )
  821. TELSetupFilter                    (short                     procID,
  822.                                  Ptr                     theConfig,
  823.                                  short                     count,
  824.                                  DialogPtr                 theDialog,
  825.                                  EventRecord *            theEvent,
  826.                                  short *                theItem,
  827.                                  long *                    magicCookie);
  828.  
  829. EXTERN_API( void )
  830. TELSetupItem                    (short                     procID,
  831.                                  Ptr                     theConfig,
  832.                                  short                     count,
  833.                                  DialogPtr                 theDialog,
  834.                                  short *                theItem,
  835.                                  long *                    magicCookie);
  836.  
  837. EXTERN_API( void )
  838. TELSetupCleanup                    (short                     procID,
  839.                                  Ptr                     theConfig,
  840.                                  short                     count,
  841.                                  DialogPtr                 theDialog,
  842.                                  long *                    magicCookie);
  843.  
  844. EXTERN_API( void )
  845. TELSetupXCleanup                (short                     procID,
  846.                                  Ptr                     theConfig,
  847.                                  short                     count,
  848.                                  DialogPtr                 theDialog,
  849.                                  Boolean                 OKed,
  850.                                  long *                    magicCookie);
  851.  
  852. EXTERN_API( void )
  853. TELSetupPostflight                (short                     procID);
  854.  
  855. EXTERN_API( TELErr )
  856. TELDispose                        (TELHandle                 hTEL);
  857.  
  858. EXTERN_API( short )
  859. TELCountDNs                        (TELHandle                 hTEL,
  860.                                  short                     dnType,
  861.                                  Boolean                 physical);
  862.  
  863. EXTERN_API( TELErr )
  864. TELDNLookupByIndex                (TELHandle                 hTEL,
  865.                                  short                     dnType,
  866.                                  Boolean                 physical,
  867.                                  short                     index,
  868.                                  TELDNHandle *            hTELDN);
  869.  
  870. EXTERN_API( TELErr )
  871. TELDNLookupByName                (TELHandle                 hTEL,
  872.                                  ConstStr255Param         DN,
  873.                                  TELDNHandle *            hTELDN);
  874.  
  875. EXTERN_API( TELErr )
  876. TELDNSelect                        (TELDNHandle             hTELDN,
  877.                                  Boolean                 select);
  878.  
  879. EXTERN_API( TELErr )
  880. TELDNDispose                    (TELDNHandle             hTELDN);
  881.  
  882. EXTERN_API( TELErr )
  883. TELGetDNInfo                    (TELDNHandle             hTELDN);
  884.  
  885. EXTERN_API( TELErr )
  886. TELGetDNFlags                    (TELDNHandle             hTELDN,
  887.                                  long *                    dnFeatureFlags,
  888.                                  long *                    dnForwardFlags);
  889.  
  890. EXTERN_API( TELErr )
  891. TELDNMsgHand                    (TELDNHandle             hTELDN,
  892.                                  Boolean                 allDNs,
  893.                                  long                     eventMask,
  894.                                  TelephoneDNMsgProcPtr     msgProc,
  895.                                  long                     globals);
  896.  
  897. EXTERN_API( TELErr )
  898. TELClrDNMsgHand                    (TELDNHandle             hTELDN,
  899.                                  TelephoneDNMsgProcPtr     msgProc);
  900.  
  901. EXTERN_API( TELErr )
  902. TELDNEventsSupp                    (TELDNHandle             hTELDN,
  903.                                  long *                    eventMask);
  904.  
  905. EXTERN_API( short )
  906. TELCountCAs                        (TELDNHandle             hTELDN,
  907.                                  short                     internalExternal);
  908.  
  909. EXTERN_API( TELErr )
  910. TELCALookup                        (TELDNHandle             hTELDN,
  911.                                  short                     internalExternal,
  912.                                  short                     index,
  913.                                  TELCAHandle *            hTELCA);
  914.  
  915. EXTERN_API( TELErr )
  916. TELCADispose                    (TELCAHandle             hTELCA);
  917.  
  918. EXTERN_API( TELErr )
  919. TELGetCAState                    (TELCAHandle             hTELCA,
  920.                                  short *                state);
  921.  
  922. EXTERN_API( TELErr )
  923. TELGetCAFlags                    (TELCAHandle             hTELCA,
  924.                                  long *                    caFeatureFlags,
  925.                                  long *                    caOtherFeatures);
  926.  
  927. EXTERN_API( TELErr )
  928. TELGetCAInfo                    (TELCAHandle             hTELCA);
  929.  
  930. EXTERN_API( TELErr )
  931. TELCAMsgHand                    (TELDNHandle             hTELDN,
  932.                                  long                     eventMask,
  933.                                  TelephoneCAMsgProcPtr     msgProc,
  934.                                  long                     globals);
  935.  
  936. EXTERN_API( TELErr )
  937. TELClrCAMsgHand                    (TELDNHandle             hTELDN,
  938.                                  TelephoneCAMsgProcPtr     msgProc);
  939.  
  940. EXTERN_API( TELErr )
  941. TELCAEventsSupp                    (TELDNHandle             hTELDN,
  942.                                  long *                    eventMask);
  943.  
  944. EXTERN_API( TELErr )
  945. TELSetupCall                    (TELDNHandle             hTELDN,
  946.                                  TELCAHandle *            hTELCA,
  947.                                  ConstStr255Param         destDN,
  948.                                  ConstStr255Param         destName,
  949.                                  ConstStr255Param         destSubaddress,
  950.                                  ConstStr255Param         userUserInfo,
  951.                                  short                     bearerType,
  952.                                  short                     rate);
  953.  
  954. EXTERN_API( TELErr )
  955. TELConnect                        (TELCAHandle             hTELCA);
  956.  
  957. EXTERN_API( TELErr )
  958. TELDialDigits                    (TELCAHandle             hTELCA,
  959.                                  ConstStr255Param         digits);
  960.  
  961. EXTERN_API( TELErr )
  962. TELAcceptCall                    (TELCAHandle             hTELCA);
  963.  
  964. EXTERN_API( TELErr )
  965. TELRejectCall                    (TELCAHandle             hTELCA,
  966.                                  short                     reason);
  967.  
  968. EXTERN_API( TELErr )
  969. TELDeflectCall                    (TELCAHandle             hTELCA,
  970.                                  ConstStr255Param         rmtDN,
  971.                                  ConstStr255Param         rmtName,
  972.                                  ConstStr255Param         rmtSubaddress);
  973.  
  974. EXTERN_API( TELErr )
  975. TELAnswerCall                    (TELCAHandle             hTELCA);
  976.  
  977. EXTERN_API( TELErr )
  978. TELDrop                            (TELCAHandle             hTELCA,
  979.                                  ConstStr255Param         userUserInfo);
  980.  
  981. EXTERN_API( TELErr )
  982. TELHold                            (TELCAHandle             hTELCA);
  983.  
  984. EXTERN_API( TELErr )
  985. TELRetrieve                        (TELCAHandle             hTELCA);
  986.  
  987. EXTERN_API( TELErr )
  988. TELConferencePrep                (TELCAHandle             hTELCA1,
  989.                                  TELCAHandle             hTELCA2,
  990.                                  short                     numToConference);
  991.  
  992. EXTERN_API( TELErr )
  993. TELConferenceEstablish            (TELCAHandle             hTELCA1,
  994.                                  TELCAHandle             hTELCA2);
  995.  
  996. EXTERN_API( TELErr )
  997. TELConferenceSplit                (TELCAHandle             hTELCA);
  998.  
  999. EXTERN_API( TELErr )
  1000. TELTransferPrep                    (TELCAHandle             hTELCA1,
  1001.                                  TELCAHandle             hTELCA2);
  1002.  
  1003. EXTERN_API( TELErr )
  1004. TELTransferEstablish            (TELCAHandle             hTELCA1,
  1005.                                  TELCAHandle             hTELCA2);
  1006.  
  1007. EXTERN_API( TELErr )
  1008. TELTransferBlind                (TELCAHandle             hTELCA,
  1009.                                  ConstStr255Param         rmtDN,
  1010.                                  ConstStr255Param         rmtName,
  1011.                                  ConstStr255Param         rmtSubaddress);
  1012.  
  1013. EXTERN_API( TELErr )
  1014. TELForwardSet                    (TELDNHandle             hTELDN,
  1015.                                  ConstStr255Param         forwardDN,
  1016.                                  ConstStr255Param         forwardName,
  1017.                                  ConstStr255Param         forwardSubaddress,
  1018.                                  short                     forwardType,
  1019.                                  short                     numrings);
  1020.  
  1021. EXTERN_API( TELErr )
  1022. TELForwardClear                    (TELDNHandle             hTELDN,
  1023.                                  short                     forwardType);
  1024.  
  1025. EXTERN_API( TELErr )
  1026. TELCallbackSet                    (TELCAHandle             hTELCA,
  1027.                                  short *                callbackRef);
  1028.  
  1029. EXTERN_API( TELErr )
  1030. TELCallbackClear                (TELHandle                 hTEL,
  1031.                                  short                     callbackRef);
  1032.  
  1033. EXTERN_API( TELErr )
  1034. TELCallbackNow                    (TELCAHandle             hTELCA,
  1035.                                  short                     callbackRef);
  1036.  
  1037. EXTERN_API( TELErr )
  1038. TELDNDSet                        (TELDNHandle             hTELDN,
  1039.                                  short                     dndType);
  1040.  
  1041. EXTERN_API( TELErr )
  1042. TELDNDClear                        (TELDNHandle             hTELDN,
  1043.                                  short                     dndType);
  1044.  
  1045. EXTERN_API( TELErr )
  1046. TELCallPickup                    (TELCAHandle             hTELCA,
  1047.                                  ConstStr255Param         pickupDN,
  1048.                                  short                     pickupGroupID);
  1049.  
  1050. EXTERN_API( TELErr )
  1051. TELParkCall                        (TELCAHandle             hTELCA,
  1052.                                  StringPtr *            parkRetrieveID,
  1053.                                  ConstStr255Param         parkID);
  1054.  
  1055. EXTERN_API( TELErr )
  1056. TELRetrieveParkedCall            (TELCAHandle             hTELCA,
  1057.                                  ConstStr255Param         parkRetrieveID);
  1058.  
  1059. EXTERN_API( TELErr )
  1060. TELVoiceMailAccess                (TELCAHandle             hTELCA);
  1061.  
  1062. EXTERN_API( TELErr )
  1063. TELPaging                        (TELCAHandle             hTELCA,
  1064.                                  short                     pageID);
  1065.  
  1066. EXTERN_API( TELErr )
  1067. TELIntercom                        (TELCAHandle             hTELCA,
  1068.                                  short                     intercomID);
  1069.  
  1070. EXTERN_API( TELErr )
  1071. TELOtherFeatureList                (TELHandle                 hTEL,
  1072.                                  FeatureListPtr *        fList);
  1073.  
  1074. EXTERN_API( TELErr )
  1075. TELOtherFeatureImplement        (TELHandle                 hTEL,
  1076.                                  Handle                 theHandle,
  1077.                                  short                     featureID);
  1078.  
  1079. EXTERN_API( TELErr )
  1080. TELToolFunctions                (TELHandle                 hTEL,
  1081.                                  short                     msgcode,
  1082.                                  Boolean *                supportsIt);
  1083.  
  1084. EXTERN_API( TELErr )
  1085. TELOtherFunction                (TELHandle                 hTEL,
  1086.                                  Ptr                     paramblock,
  1087.                                  long                     size);
  1088.  
  1089. EXTERN_API( TELErr )
  1090. TELGetHooksw                    (TELHandle                 hTEL,
  1091.                                  short                     hookType,
  1092.                                  Boolean *                offHook);
  1093.  
  1094. EXTERN_API( TELErr )
  1095. TELSetHooksw                    (TELHandle                 hTEL,
  1096.                                  short                     hookType,
  1097.                                  Boolean                 offHook);
  1098.  
  1099. EXTERN_API( TELErr )
  1100. TELGetVolume                    (TELHandle                 hTEL,
  1101.                                  short                     volType,
  1102.                                  short *                level,
  1103.                                  short *                volState);
  1104.  
  1105. EXTERN_API( TELErr )
  1106. TELSetVolume                    (TELHandle                 hTEL,
  1107.                                  short                     volType,
  1108.                                  short *                level,
  1109.                                  short                     volState);
  1110.  
  1111. EXTERN_API( TELErr )
  1112. TELAlert                        (TELHandle                 hTEL,
  1113.                                  short *                level,
  1114.                                  short                     alertPattern);
  1115.  
  1116. EXTERN_API( TELErr )
  1117. TELGetDisplay                    (TELHandle                 hTEL,
  1118.                                  short                     index,
  1119.                                  short *                displayMode,
  1120.                                  StringPtr *            text);
  1121.  
  1122. EXTERN_API( TELErr )
  1123. TELSetDisplay                    (TELHandle                 hTEL,
  1124.                                  short                     index,
  1125.                                  short                     displayMode,
  1126.                                  ConstStr255Param         text);
  1127.  
  1128. EXTERN_API( void )
  1129. TELIdle                            (TELHandle                 hTEL);
  1130.  
  1131. EXTERN_API( void )
  1132. TELActivate                        (TELHandle                 hTEL,
  1133.                                  Boolean                 activate);
  1134.  
  1135. EXTERN_API( void )
  1136. TELResume                        (TELHandle                 hTEL,
  1137.                                  Boolean                 resume);
  1138.  
  1139. EXTERN_API( Boolean )
  1140. TELMenu                            (TELHandle                 hTEL,
  1141.                                  short                     menuID,
  1142.                                  short                     item);
  1143.  
  1144. EXTERN_API( void )
  1145. TELEvent                        (TELHandle                 hTEL,
  1146.                                  const EventRecord *    theEvent);
  1147.  
  1148. EXTERN_API( void )
  1149. TELGetToolName                    (short                     procID,
  1150.                                  Str255                 name);
  1151.  
  1152. EXTERN_API( Handle )
  1153. TELGetVersion                    (TELHandle                 hTEL);
  1154.  
  1155. EXTERN_API( short )
  1156. TELGetTELVersion                (void);
  1157.  
  1158. EXTERN_API( TELErr )
  1159. TELIntlToEnglish                (TELHandle                 hTEL,
  1160.                                  Ptr                     inputPtr,
  1161.                                  Ptr *                    outputPtr,
  1162.                                  short                     language);
  1163.  
  1164. EXTERN_API( TELErr )
  1165. TELEnglishToIntl                (TELHandle                 hTEL,
  1166.                                  Ptr                     inputPtr,
  1167.                                  Ptr *                    outputPtr,
  1168.                                  short                     language);
  1169.  
  1170. EXTERN_API( TELErr )
  1171. TELGetDNSoundInput                (TELDNHandle             hTELDN,
  1172.                                  Str255                 deviceName);
  1173.  
  1174. EXTERN_API( TELErr )
  1175. TELDisposeDNSoundInput            (TELDNHandle             hTELDN,
  1176.                                  ConstStr255Param         deviceName);
  1177.  
  1178. EXTERN_API( TELErr )
  1179. TELGetDNSoundOutput                (TELDNHandle             hTELDN,
  1180.                                  Component *            SndOut);
  1181.  
  1182. EXTERN_API( TELErr )
  1183. TELDisposeDNSoundOutput            (TELDNHandle             hTELDN,
  1184.                                  Component                 SndOut);
  1185.  
  1186. EXTERN_API( TELErr )
  1187. TELGetHSSoundInput                (TELHandle                 termHand,
  1188.                                  Str255                 deviceName);
  1189.  
  1190. EXTERN_API( TELErr )
  1191. TELDisposeHSSoundInput            (TELHandle                 termHand,
  1192.                                  ConstStr255Param         deviceName);
  1193.  
  1194. EXTERN_API( TELErr )
  1195. TELGetHSSoundOutput                (TELHandle                 termHand,
  1196.                                  Component *            SndOut);
  1197.  
  1198. EXTERN_API( TELErr )
  1199. TELDisposeHSSoundOutput            (TELHandle                 termHand,
  1200.                                  Component                 SndOut);
  1201.  
  1202. EXTERN_API( TELErr )
  1203. TELDNSetAutoAnswer                (TELDNHandle             hTELDN,
  1204.                                  Boolean                 AutoAnswerOn);
  1205.  
  1206. EXTERN_API( TELErr )
  1207. TELDNTollSaverControl            (TELDNHandle             hTELDN,
  1208.                                  Boolean                 QuickAnswer);
  1209.  
  1210. EXTERN_API( TELErr )
  1211. TELSetIndHSConnect                (TELHandle                 termHand,
  1212.                                  Boolean                 Connect);
  1213.  
  1214. EXTERN_API( TELErr )
  1215. TELGetIndHSConnect                (TELHandle                 termHand,
  1216.                                  Boolean *                Connect);
  1217.  
  1218. EXTERN_API( TELErr )
  1219. TELCAVoiceDetect                (TELCAHandle             hTELCA,
  1220.                                  Boolean                 VoiceDetectOn);
  1221.  
  1222. EXTERN_API( TELErr )
  1223. TELCASilenceDetect                (TELCAHandle             hTELCA,
  1224.                                  Boolean                 DetectOn,
  1225.                                  long                     Period);
  1226.  
  1227. EXTERN_API( TELErr )
  1228. TELGetTelNewErr                    (void);
  1229.  
  1230. EXTERN_API( TELErr )
  1231. TELDNSetDTMF                    (TELDNHandle             hTELDN,
  1232.                                  Boolean                 dtmfOn);
  1233.  
  1234. EXTERN_API( TELErr )
  1235. TELDNGetDTMF                    (TELDNHandle             hTELDN,
  1236.                                  Boolean *                dtmfOn);
  1237.  
  1238. EXTERN_API( TELErr )
  1239. TELHSSetDTMF                    (TELHandle                 termHand,
  1240.                                  Boolean                 dtmfOn);
  1241.  
  1242. EXTERN_API( TELErr )
  1243. TELHSGetDTMF                    (TELHandle                 termHand,
  1244.                                  Boolean *                dtmfOn);
  1245.  
  1246. EXTERN_API( TELErr )
  1247. TELGetDNStatus                    (TELDNHandle             hTELDN,
  1248.                                  long *                    inUse);
  1249.  
  1250. EXTERN_API( TELErr )
  1251. TELGetDNProgressDet                (TELDNHandle             hTELDN,
  1252.                                  long                     selector,
  1253.                                  Boolean *                prgDetOn);
  1254.  
  1255. EXTERN_API( TELErr )
  1256. TELSetDNProgressDet                (TELDNHandle             hTELDN,
  1257.                                  long                     selector,
  1258.                                  Boolean                 prgDetOn);
  1259.  
  1260.  
  1261.  
  1262. #if PRAGMA_STRUCT_ALIGN
  1263.     #pragma options align=reset
  1264. #elif PRAGMA_STRUCT_PACKPUSH
  1265.     #pragma pack(pop)
  1266. #elif PRAGMA_STRUCT_PACK
  1267.     #pragma pack()
  1268. #endif
  1269.  
  1270. #ifdef PRAGMA_IMPORT_OFF
  1271. #pragma import off
  1272. #elif PRAGMA_IMPORT
  1273. #pragma import reset
  1274. #endif
  1275.  
  1276. #ifdef __cplusplus
  1277. }
  1278. #endif
  1279.  
  1280. #endif /* __TELEPHONES__ */
  1281.  
  1282.